{% extends 'promos/base.html' %}

{% block title %}Promo Billboard List{% endblock %}

{% block main_content %}
<h1>{{ promo.headline }}</h1>
<div class="edit-promo-tabs">
    <div class="tab-links">
        <a href="{% url promos_promo_edit promo_id=promo.id %}" rel="promo-info">Pitch</a>
        <a href="{% url promos_promo_add_edit_point promo_id=promo.id %}" rel="promo-info" title="Geotag">Geotag</a>
        <a href="{% url promos_promo_image_list promo_id=promo.id %}">Images</a>
        <a href="{% url promos_promo_link_list promo_id=promo.id %}">Related Links</a>
        <a href="{% url promos_promo_date_list promo_id=promo.id %}">Suggested Dates</a>
        <a href="" class="active">Billboards</a>
        <a href="{% url promos_promo_detail promo_id=promo.id %}">Detail</a>
        <br class="clearboth" />
    </div>
    <div class="tab-contents">
    {% if promo_billboard %}
    <table cellspacing="0" cellpadding="0" class="list-table">
        <thead>
            <tr>
                <th>Campaign</th>
                <th>Headline</th>
                <th>Supporting Text</th>
                <th>Promo</th>
                <th>Actions</th>
            </tr>
        </thead>
        {% for billboard in promo_billboard%}
        <tr class="{% cycle '' 'alt-row' %}">
            <td><a href="{% url promos_promo_billboard_edit promo_id=billboard.promo_id,billboard_id=billboard.id %}">{{ billboard }}</a> </td>
            <td>{{billboard.headline}}</td>
            <td>{{billboard.supporting_text}}</td>
            <td><a href='{% url  promos_promo_edit promo_id=billboard.promo.id %}'>{{ billboard.promo.headline }}</a></td>
            <td><a href="{% url promos_promo_billboard_detail promo_id=billboard.promo_id,billboard_id=billboard.id %}">Preview</a> | <a href="{% url promos_promo_billboard_edit promo_id=billboard.promo_id,billboard_id=billboard.id %}">Edit</a> | <a href="{% url promos_promo_billboard_delete promo_id=billboard.promo_id,billboard_id=billboard.id %}">Delete</a></td>
        </tr>
        {% endfor %}
    </table>
    {% else %}
        <p>You haven't submitted any billboards yet.</p>
    {% endif %}
    </div>
</div>

{% endblock %}

{% block subnav %}
<h2>Links</h2>
<ul class="action-links">
    <li><a href="{% url promos_promo_list %}">Promo List</a></li>
    <li><a href="{% url promos_promo_billboard_add promo_id=promo.id%}" title="Add a Link">Add a Billboard</a></li>
    <li><a href='{% url promos_promo_billboard_calendar_now promo_id=promo.id %}'>Calendar</a></li>
 </ul>
{% endblock %}
